﻿
<div style="background-color:#F8F8F8" ms-controller="KSAPVIEW">

    <script type="text/javascript">

        var tempindex = avalon.define({
            $id: "KSAPVIEW",
            InitWigetData: function (strId) {
                model.title = "考试安排";
                model.ShowColumns.pushArray(
                [{ ColName: "KSName", ColText: "考试安排名称", IsSel: true }, 
                      { ColName: "Status", ColText: "考试状态", IsSel: true, format: "ksapstatus" },
                      { ColName: "KSDate", ColText: "考试时间", IsSel: true, format: "dateformat" },
                      { ColName: "KSSC", ColText: "考试时长(分钟)", IsSel: true },
                      { ColName: "YCSY", ColText: "可延长时间(分钟)", IsSel: true },
                      { ColName: "SJName", ColText: "考试试卷", IsSel: false },
                      { ColName: "YJTeacher", ColText: "阅卷老师", IsSel: true, format: "username" },
                      { ColName: "KSUser", ColText: "考试人员", IsSel: true, format: "username" },
                      { ColName: "Address", ColText: "考试地址", IsSel: true },
                      { ColName: "Remark", ColText: "考试安排描述", IsSel: true },
                ]);

                if (strId) {
                    //编辑加载数据
                    $.getJSON('/API/VIEWAPI.ashx?Action=KSGL_GETKSAPMODEL', { P1: strId }, function (resultData) {
                        if (resultData.ErrorMsg == "") {
                            resultData.Result.SJName = resultData.Result2;
                            resultData.Result.Status = resultData.Result1;
                            model.modelData = resultData.Result;
                            if (model.modelData.Status != 0)
                            {
                                model.isEdit = false;
                            }
                            setTimeout(" ComFunJS.initForm()", 500)
                        }
                    })
                }
            }
        });
    </script>
</div>
